Skip to content

Conversation

@xHeaven
Copy link
Contributor

@xHeaven xHeaven commented Dec 15, 2025

No description provided.

@xHeaven
Copy link
Contributor Author

xHeaven commented Dec 15, 2025

If we like it, it can be merged regardless of the coding conventions, it's just Mago trying to mess up the code.

❯ ./vendor/bin/mago fmt --dry-run
diff of 'packages/console/src/Commands/CompletionUninstallCommand.php':
--- original
+++ modified
@@ -103,9 +103,7 @@
             return true;
         }

-        $newContent = read_file($rcFile)
-                |> $this->removeCompletionLines(...)
-                |> (static fn (string $c): string => preg_replace("/\n{3,}/", "\n\n", $c) ?? $c);
+        $newContent = read_file($rcFile) |> $this->removeCompletionLines(...) |> static fn (string $c): string => preg_replace("/\n{3,}/", "\n\n", $c) ?? $c;

         write_file($rcFile, $newContent);
         $this->info("Removed completion config from {$rcFile}");

 INFO Found 1 file(s) that need formatting.

Technically we could update it to the latest release candidate, since this issue is fixed there already... but I'll leave that to someone braver, loooots of changes.

@brendt
Copy link
Member

brendt commented Jan 5, 2026

Just keep the Mago changes, if it's fixed in a later version then we'll have Mago automatically fix it then. Otherwise we'll keep running into styling issues for all PRs until Mago is updated.

Can you write a little bit about this feature? How it works and how to use it? Did you take any code from other frameworks that we need to credit?

Also, maybe add a doc entry for it? Maybe a new section in https://tempestphp.com/2.x/essentials/console-commands ?

@xHeaven
Copy link
Contributor Author

xHeaven commented Jan 5, 2026

Just keep the Mago changes, if it's fixed in a later version then we'll have Mago automatically fix it then. Otherwise we'll keep running into styling issues for all PRs until Mago is updated.

Mago should be updated already, but we need to bump it (it hit 1.0 actually!). I can't keep the changes currently with the beta version we're using, because it quite literally breaks the code. Mago's proposed syntax is broken.

Can you write a little bit about this feature? How it works and how to use it? Did you take any code from other frameworks that we need to credit?

I'll make a bit of a write-up about it (soonTM). The use should be fairly easy - ./tempest completion:install, then select the installation method and you're good to go, smash the tab after typing ./tempest .
I didn't take code from other frameworks, in fact, I've removed the Symfony credits, too, because after the rework, it barely resembles anything like the forked version.

Also, maybe add a doc entry for it? Maybe a new section in https://tempestphp.com/2.x/essentials/console-commands ?

Yeah, can do. I'll update the branch with it soon.

@xHeaven xHeaven marked this pull request as draft January 5, 2026 21:38
@xHeaven
Copy link
Contributor Author

xHeaven commented Jan 5, 2026

Actually, let me hold onto this for a bit more, it seems kinda buggy right now for some reason.

@xHeaven
Copy link
Contributor Author

xHeaven commented Jan 6, 2026

Closing this in favor of #1851.

@xHeaven xHeaven closed this Jan 6, 2026
@xHeaven xHeaven deleted the completion branch January 6, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants